feat(@schematics/angular): stabilize refactor-jasmine-vitest schematic#32874
Conversation
48214dd to
fe6dcba
Compare
There was a problem hiding this comment.
Code Review
This pull request expands the Jasmine to Vitest migration schematics by adding support for several Jasmine APIs, including toBeNullish, createSpy, and various spy strategies. It also introduces TODO comments for unsupported Jasmine features and improves existing transformations for fail() and spy call inspections. Feedback was provided to improve the toBeNullish transformation by using loose equality to avoid double evaluation of expressions with side effects, and to use the TypeScript factory API for numeric literals in transformThisFor for better consistency.
Stabilize `refactor-jasmine-vitest` schematic by covering the known remaining test patterns and cases.
fe6dcba to
c742ac9
Compare
|
This PR was merged into the repository. The changes were merged into the following branches:
|
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Stabilize
refactor-jasmine-vitestschematic by covering the known remaining test patterns and cases.The current state of the schematic covers the most common and used test patterns. This PR adds rather peripheral API to the list of supported transformations. Most of these do not have a Vitest equivalent.
jasmine.createSpy('withName')spy.calls.thisFor(index)spy.calls.saveArgumentsByValue()spy.and.identity().and.returnValue(Promise.resolve(x))/.and.returnValue(Promise.reject(x))fail(new Error())jasmine.clock().withMock()jasmine.clock().autoTick()jasmine.addAsyncMatchers()jasmine.addSpyStrategy()jasmine.addCustomObjectFormatter()toBeNullish()throwUnless()/throwUnlessAsync()getSpecProperty()jasmine.MAX_PRETTY_PRINT_DEPTH/MAX_PRETTY_PRINT_CHARS/MAX_PRETTY_PRINT_ARRAY_LENGTH